<template>
  <view class="notice-card">
    <image :src="noticeImg" mode="heightFix" style="height: 360rpx" />
    <view class="n-text">开启通知，不错过亲家的消息</view>
    <view class="n-btn" @click="openNotice"><custom-btn>去开启</custom-btn></view>
  </view>
</template>

<script setup>
import { urlConf } from "@/config/resource";

import useStore from "@/store";
const { common } = useStore();
const noticeImg = urlConf + "common/notice-bg.svg";
const openFn = inject("openFn", () => {});
const openNotice = () => {
  common.updatePopupOpen(false, "notice");
  setTimeout(() => {
    uni.navigateTo({ url: "/subPages/gzhpage/index" });
  }, 100);
};
</script>

<style lang=scss scoped>
.notice-card {
  width: 650rpx;
  height: 660rpx;
  border-radius: 30rpx;
  background: #fff;
  .n-text {
    text-align: center;
    font-weight: 800;
    font-size: 40rpx;
    color: #333;
    padding: 40rpx 0;
  }
  .n-btn {
    width: 400rpx;
    height: 100rpx;
    line-height: 100rpx;
    font-weight: 500;
    font-size: 32rpx;
    color: #fff;
    background: linear-gradient(180deg, rgba(241, 55, 64, 0.9) 0%, #f13740 100%);
    box-shadow: 0rpx 20rpx 40rpx 0rpx rgba(241, 55, 64, 0.25);
    border-radius: 120rpx;
    margin: 0 auto;
  }
}
</style>